updated helper functions for mapreduce