writing test for parMap and reimplemented it.