first attempt at problem 2
getting it wrong, not sure why yet.
fixed, problem 2 giving correct answer.