added the gateway class