Merge code for HW2