some refactoring: tile map