Improved TestNDFA