added getTile function