completed problem 3 on hw1