added nonterminal functions