Completed problem 3.1