updated structure of parser