parsing case 1 solution.