map method completed with passing tests