refactor and move scenario helper