added case2 and case3