almost have merge mapreduce function working :)