parser refactoring

parser refactoring