added map functionality with testing, needs to be refactored