some refactoring of cqs stress tester