udpate ac-automaton