parse refactoring