final refactor for Refactor Challenge