rewriting after data rebase