refactored map logic into it's own namespace