updated ClouQuery parameter, code refactor