solutions for exercise 23 6749167