solve problem 19
solve problem 20
solve problem 21
solve problem 22