(#773) add built in map reduce functions