Finished problem 1 of HW 2