Non-working solution: First pass at problem 17