improved getTile() method