refactoring out map into separate file