First cut at the solution