update test cases and explanation