rewrite with go