Rewrite to go