added hw2 prob 3