solved #7, refactoring challenge