refactoring parser layout