solve problem 18
solve problem 19
solve problem 20