works for test case1