refactored tilemap to level