Completed problem 3 section