finished refactoring challenge