refactored tile retrieval