refactor of stress test