added number of reduce tasks parameter