enhance the simulation of NFA