combine code & open -> gateOpen