toNFA renamed to toAutomaton