second version of parser