add gateway methods and cloud factory