merge intervals