added application.yml, refactored map method