working on ApiGateway class