Added map and reduce