Completed problem 2