mapreduce with stored functions fixed
tests