problem 18 complete