finish optmized version of intersection automaton build