renamed Sort to NonTerminal, and Sort2 to Sort