diff --git a/examples/CanonicalAxes.hs b/examples/CanonicalAxes.hs
--- a/examples/CanonicalAxes.hs
+++ b/examples/CanonicalAxes.hs
@@ -1,4 +1,5 @@
-{-# LANGUAGE OverloadedStrings, BangPatterns, FlexibleInstances,UndecidableInstances  #-}
+{-# LANGUAGE OverloadedStrings, BangPatterns, FlexibleInstances,UndecidableInstances, FlexibleContexts  #-}
+
 module Main where
 
 import Control.Monad(when)
@@ -13,17 +14,17 @@
 import Data.List
 import Text.Printf
 
---ifoldrPairs :: (Iterable Structure b, Iterable Structure b1) =>(t -> c -> c) -> (b -> b1 -> t) -> c -> Structure -> c
-ifoldrPairs fred fpair e s = pairs
+itfoldrPairs :: (Iterable Structure a) =>(b -> c -> c) -> (a -> a -> b) -> c -> Structure -> c
+itfoldrPairs fred fpair e s = pairs
   where
-    pairs' a cont = It.ifoldr (\at r -> (at `fpair` a) `fred` r) cont (s :: Structure)
-    pairs         = It.ifoldr pairs'                             e    (s :: Structure)
+    pairs' a cont = It.itfoldr (\at r -> (at `fpair` a) `fred` r) cont (s :: Structure)
+    pairs         = It.itfoldr pairs'                             e    (s :: Structure)
 
---ifoldPairs :: (Iterable Structure b, Iterable Structure c) =>(c -> c -> c) -> (b -> c -> c) -> c -> Structure -> c
-ifoldPairs fred fpair e s = pairs
+itfoldPairs :: (Iterable Structure a) =>(b -> c -> c) -> (a -> a -> b) -> c -> Structure -> c
+itfoldPairs fred fpair e s = pairs
   where
-    pairs' a cont = It.ifoldl' (\r at -> (at `fpair` a) `fred` r) cont (s :: Structure)
-    pairs         = It.ifoldl' pairs'                             e    (s :: Structure)
+    pairs' a cont = It.itfoldl' (\r at -> (at `fpair` a) `fred` r) cont (s :: Structure)
+    pairs         = It.itfoldl' (flip pairs')                      e    (s :: Structure)
 
 -- | findAxes finds all three principal axes so that dimensions are ordered.
 findAxes structure = let v1    = findLongestOrthogonalVector [            ] structure
@@ -37,11 +38,9 @@
                          dim3  = vnorm v3
                      in dim1 `seq` dim2 `seq` dim3 `seq` ([dim1, dim2, dim3], [axis1, axis2, axis3])
   where
-    findLongestOrthogonalVector axes = undefined --ifoldPairs pickMaxDist (atDistPerpend axes) nullVector 
+    findLongestOrthogonalVector axes = itfoldPairs pickMaxDist (atDistPerpend axes) nullVector 
     nullVector          = fromInteger 0
-    atDistPerpend ::  [Vector3] -> Atom -> Vector3 -> Vector3
-    atDistPerpend axes !a1 !a2 = vperpends (coord a1 - a2) axes
-    pickMaxDist ::  Vector3 -> Vector3 -> Vector3
+    atDistPerpend axes !a1 !a2 = vperpends (coord a1 - coord a2) axes
     pickMaxDist !v1 !v2 = if vnorm v1 > vnorm v2 then v1 else v2
 
 main = do args <- getArgs
diff --git a/examples/CleanPDB.hs b/examples/CleanPDB.hs
--- a/examples/CleanPDB.hs
+++ b/examples/CleanPDB.hs
@@ -21,18 +21,18 @@
 runCounterM = fst . flip runState 1
 
 renumberResidues :: (Iterable s Chain) => s -> s
-renumberResidues = imap (\ch -> runCounterM          .
-                                imapM forEachResidue $ (ch :: Chain))
+renumberResidues = itmap (\ch -> runCounterM          .
+                                 itmapM forEachResidue $ (ch :: Chain))
   where
     forEachResidue r = do v <- counter
                           return $ r { resSeq = v }
 
 renumberAtoms :: (Iterable s Model) => s -> s
-renumberAtoms = imap (\m -> runCounterM $
-                            imapM forEachChain (m :: Model))
+renumberAtoms = itmap (\m -> runCounterM $
+                             itmapM forEachChain (m :: Model))
   where
     forEachChain :: Chain -> CounterM Chain
-    forEachChain ch = do newCh <- imapM forEachAtom ch
+    forEachChain ch = do newCh <- itmapM forEachAtom ch
                          counter
                          return newCh
     forEachAtom :: Atom -> CounterM Atom
diff --git a/examples/PDB2Fasta.hs b/examples/PDB2Fasta.hs
--- a/examples/PDB2Fasta.hs
+++ b/examples/PDB2Fasta.hs
@@ -61,12 +61,12 @@
                                        Nothing -> Prelude.putStrLn $ "No models found within file '" ++ fname ++ "'."
                                        Just m  -> process m
   where
-    process = PDB.ifoldM (\() ch -> Prelude.putStrLn $ mkRecord fname ch) ()
+    process = PDB.itfoldM (\() ch -> Prelude.putStrLn $ mkRecord fname ch) ()
     mkRecord = if gapped opts
                  then fastaGappedRecord
                  else fastaRecord 
 
---printFastaRecords fname s = PDB.ifoldM (\() ch -> Prelude.putStrLn $ fastaRecord fname ch) () s
+--printFastaRecords fname s = PDB.itfoldM (\() ch -> Prelude.putStrLn $ fastaRecord fname ch) () s
 
 processFile opts fname = do maybePDB <- PDB.parse fname
                             forM_ maybePDB $ printFastaRecords opts fname
diff --git a/examples/Rg.hs b/examples/Rg.hs
--- a/examples/Rg.hs
+++ b/examples/Rg.hs
@@ -35,17 +35,17 @@
 radiusOfGyration structure = avgDistDev
   where
     -- (c -> b -> c) -> c -> a -> c
-    avgDistDev = sqrt (ifoldl' addDistDev 0.0 structure/totalMass)
+    avgDistDev = sqrt (itfoldl' addDistDev 0.0 structure/totalMass)
     addDistDev !total at = total + vnorm (coord at - center)**2 * atMass at
     atMass :: Atom -> Double
     atMass at = atomicMass $ case assignElement at of
                                ""        -> "C"
                                otherwise -> otherwise
     center = v |* (1.0/totalMass)
-      where v = ifoldl' addCoord nullVector structure
+      where v = itfoldl' addCoord nullVector structure
     nullVector              = fromInteger 0
     addCoord v (at :: Atom) = v + coord at |* atMass at
     counter  x (at :: Atom) = x + atMass at 
-    totalMass               = ifoldl' counter 0.0 structure
+    totalMass               = itfoldl' counter 0.0 structure
 
 
diff --git a/examples/ShiftToCenter.hs b/examples/ShiftToCenter.hs
--- a/examples/ShiftToCenter.hs
+++ b/examples/ShiftToCenter.hs
@@ -12,12 +12,12 @@
 center :: PDB.Structure -> Vector3
 center s = avgv
   where
-    sumv = ifoldl' addCoord 0 (s :: PDB.Structure)
+    sumv = itfoldl' addCoord 0 (s :: PDB.Structure)
     n = realToFrac . fromIntegral . PDB.numAtoms $ s
     addCoord v (PDB.Atom { coord   = c }) = v+c
     avgv = (1/n) *| sumv
 
-shift v = PDB.imap subCoord
+shift v = PDB.itmap subCoord
   where
     subCoord (at@Atom { coord = c }) = at { coord = c - v }
 
diff --git a/examples/StericClashCheck.hs b/examples/StericClashCheck.hs
--- a/examples/StericClashCheck.hs
+++ b/examples/StericClashCheck.hs
@@ -10,7 +10,7 @@
 
 -- TODO: way to hand over Atom object along with its Residue, Chain and Model
 -- TODO: make it so that Show gives a "full_id" string by default, e.g. Model, chain, residue id, atom name.
-clashCheck s1 s2 = filter (/= []) . Prelude.map clashes $ ifoldr (:) [] s2
+clashCheck s1 s2 = filter (/= []) . Prelude.map clashes $ itfoldr (:) [] s2
   where
     clashes (at :: PDB.Atom) = Oct.withinRange ot (radius + maxRadius) (v3v $ PDB.coord at)
       where
@@ -26,7 +26,7 @@
   where
     vdw    = Elt.vanDerWaalsRadius elt
 
-makeOctree structure = Oct.fromList . Prelude.map extract . ifoldr (:) [] $ structure
+makeOctree structure = Oct.fromList . Prelude.map extract . itfoldr (:) [] $ structure
 
 -- Bio.PDB.Structure.Elements should export max bound for vdw etc.
 -- or a list of known element codes.
diff --git a/examples/Viewer.hs b/examples/Viewer.hs
--- a/examples/Viewer.hs
+++ b/examples/Viewer.hs
@@ -214,14 +214,14 @@
 center :: PDBS.Structure -> Vector3
 center structure = average 
   where
-    (!average, _count) = PDBI.ifoldl' step (fromIntegral 0, 0) structure
+    (!average, _count) = PDBI.itfoldl' step (fromIntegral 0, 0) structure
     step :: (Vector3, Double) -> PDBS.Atom -> (Vector3, Double)
     step (!r, !i) at = let i' = i + 1
                        in (coord at |* (1/i') + r |* (i/i'), i')
 
 dims structure = maxv - minv
   where
-    (!minv, !maxv) = PDBI.ifoldl' (\(!minv, !maxv) at -> let c = coord (at :: PDBS.Atom)
+    (!minv, !maxv) = PDBI.itfoldl' (\(!minv, !maxv) at -> let c = coord (at :: PDBS.Atom)
                                                          in (vzip min minv c,
                                                              vzip max maxv c)) (cs, cs) structure
     !cs = center structure
@@ -233,7 +233,7 @@
     [x', y', z'] :: [GL.GLdouble]  = Prelude.map realToFrac [x, y, z]
 
 renderStructure :: IORef UIState -> PDBS.Structure -> IO ()
-renderStructure uiState = PDBI.ifoldM (const renderAtom) ()
+renderStructure uiState = PDBI.itfoldM (const renderAtom) ()
   where renderAtom (at :: Atom) = GL.preservingMatrix $ do GL.matrixMode $= GL.Modelview 0
                                                            uiSt <- readIORef uiState
                                                            --m :: GL.GLmatrix GL.GLdouble <- GL.newMatrix GL.ColumnMajor $ currentViewMatrix uiSt
diff --git a/hPDB-examples.cabal b/hPDB-examples.cabal
--- a/hPDB-examples.cabal
+++ b/hPDB-examples.cabal
@@ -1,5 +1,5 @@
 name:                hPDB-examples
-version:             0.999
+version:             0.9999
 synopsis:            Examples for hPDB library
 stability:           beta
 homepage:            https://github.com/mgajda/hpdb-examples
@@ -28,7 +28,7 @@
 Executable PDB2Fasta
   main-is:          examples/PDB2Fasta.hs
   ghc-options:      -fspec-constr-count=4 -O3 
-  build-depends:    base>=4.0, base <4.7, bytestring, ghc-prim, directory, mtl, template-haskell, vector, AC-Vector, containers, deepseq, QuickCheck >= 2.5.0.0, text>=0.11.1.13, hPDB >= 0.999, iterable >=1.0
+  build-depends:    base>=4.0, base <4.7, bytestring, ghc-prim, directory, mtl, template-haskell, vector, AC-Vector, containers, deepseq, QuickCheck >= 2.5.0.0, text>=0.11.1.13, hPDB >= 0.9999, iterable >=2.0
   other-extensions:       ScopedTypeVariables OverloadedStrings BangPatterns NoMonomorphismRestriction EmptyDataDecls MagicHash
 
 Executable ShiftToCenter
