add type restriction to some mapreduce functions (restrict them to real)