update for the practice of reduce.