Add a test to ex1.23
Answer ex1.24