modify some function name and complete finite automaton match