main gate automation