add godoc, format comments a bit