first refactor step for prepareTests