done case1 and case2