refactoring step 7 - almost done