wrote a Sage soln to ex 62