change mapper key/value, fix reducer template code