rewrite dataset