added the method for next tile

added print statements in an attempt to debug.