added automaton to automatonstack in union method from buildautomaton