For 2nd part of HW3