improved merge