added performance tester, automaton improved