refactoring out map references