prepare total merge