Adding necessary methods within Terminal and NonTerminal