Solution to problem 22
Solution to exercise 23