corrected and modified parser