small map refactoring