typos
comparison between 2 automatons moved to helper method