Refactoring - factoring out "before" step for step 2 and 3