assigment 3 problem 2