Update gate.h