prepare rebuild