Exercise 3
Committing my partially complete solution for exercise three...too tired to finish