parser small refactoring