Rewrite in go.