add reduce and mapReduce