MyGate Sample Code