problem 17... complete