refactoring parsing table