added auomata & GUI functions