updating for new schema, adding mapreduce code