re-organize so example does not mangle namespace -- also use gofmt