small simplification to dotile() (thx to Ross for this hint)