Prepare reduce for HW3.