refactored to start on lesson 3 assignment 6 unit 1