Added assignment 8 problem 4