now uses getTile instead of array