Refactoring of stress-test