Assigment 3 problem 4