hw4 Problem 2, part a