initial commit
Step 2 of exercise
refactored earlier code, completed step 3 of exercise