last commit changed something s.t. it no longer got the correct parse - here we revert back to using nonterminals.values () as our iterator each time