maps refactoring