problem 17, 18 solved