updated documentation in godoc format