wrote problem 3.17