Assigment 3 problem 5