Completed problem 5