refactor cloud