Implemented map, filter and reduce