Add solutions for problem 22 and 23