added array map and reduce