HW4 assignment 2