solved problem 19
solved problem 20
solved problem 21
solved problem 22