previously edited version of parser