modified parser passing some test cases