added reduce and map operations