finished problem 1.17