updates for rewrite in Go