improved merge process