Added test cases for question 1c and 1d.