added a tile check function to the new tile function