Updated the MultiGateway class