add test cases for question 3, page 38