refactoring parsers