solution one cannot pass test case 3