working on map function
method map now compiles. Need tests
map now working