refine parser a little bit