refactored to use on mapreduce