put mapreduce js in separate file