diff --git a/Biobase/FR3D.hs b/Biobase/FR3D.hs
--- a/Biobase/FR3D.hs
+++ b/Biobase/FR3D.hs
@@ -13,6 +13,7 @@
 
 import Data.ByteString.Char8 as BS
 import Data.List as L
+import Data.Tuple.Select (sel1)
 
 import Biobase.Primary
 import Biobase.Secondary
@@ -41,16 +42,18 @@
   , pdbnumber2 :: Int
   , chain2 :: ByteString
   , seqpos2 :: Int
-  } deriving (Show)
+  } deriving (Show,Eq,Ord)
 
 -- | Linearized FR3D format.
 
 data LinFR3D = LinFR3D
   { pdbID :: ByteString
   , sequence :: ByteString
-  , pairs :: [(ExtPairIdx,ExtPair)] -- we keep the ExtPair information as provided by the non-linearized FR3D data
+  , pairs :: [TriPair]
   } deriving (Show)
 
+type TriPair = (ExtPairIdx,ExtPair,Basepair) -- we keep the ExtPair information as provided by the non-linearized FR3D data
+
 -- | The default format is a bit unwieldy; Linearization assumes that all
 -- sequences are in 5'->3' order; then produces one sequence with "&"
 -- separating the sequences and pairs reduced to (Int,Int,cWW).
@@ -63,7 +66,7 @@
   } where
       trans = snd $ L.mapAccumL ( \acc (x,y) -> (acc + 1 + BS.length y, (x,acc))
                                 ) 0 chains
-      f Basepair{..} =  (pi,p) where
+      f bp@Basepair{..} =  (pi,p,bp) where
         pi = ( ( maybe (-1) (\v -> v+seqpos1) $ L.lookup chain1 trans
                , maybe (-1) (\v -> v+seqpos2) $ L.lookup chain2 trans
                )
@@ -79,7 +82,7 @@
     f Basepair{..} = (chain1,seqpos1) < (chain2,seqpos2)
 
 instance RemoveDuplicatePairs LinFR3D where
-  removeDuplicatePairs x@LinFR3D{..} = x{pairs = L.filter (f.fst) pairs} where
+  removeDuplicatePairs x@LinFR3D{..} = x{pairs = L.filter (f.sel1) pairs} where
     f ((x,y),_) = x<y
 
 
@@ -112,7 +115,7 @@
   | otherwise = Left (linfr3d,xs)
   where
     xs = [ x
-         | x@(pi,p) <- pairs
+         | x@(pi,p,_) <- pairs
          ,  baseL pi < 0
          || baseR pi < 0
          || baseL pi >= BS.length sequence
diff --git a/BiobaseFR3D.cabal b/BiobaseFR3D.cabal
--- a/BiobaseFR3D.cabal
+++ b/BiobaseFR3D.cabal
@@ -1,5 +1,5 @@
 name:           BiobaseFR3D
-version:        0.2.2.0
+version:        0.2.3.0
 author:         Christian Hoener zu Siederdissen
 maintainer:     choener@tbi.univie.ac.at
 homepage:       http://www.tbi.univie.ac.at/~choener/
@@ -43,7 +43,8 @@
     containers,
     filemanip,
     iteratee,
-    BiobaseXNA >= 0.5.5
+    tuple,
+    BiobaseXNA == 0.6.2.0
 
   exposed-modules:
     Biobase.FR3D
