rewrite util.clone