refactoring parsing table reading