almost complete rewrite for go setup