Rewrite prepare data