parser refactoring

refactoring