updated #4 to include test cases