io solution

Straightforward and boring, except for the "" method on Goal.