added solution to problem 22