indexForTile(s) functions