diff --git a/Text/Regex/PDeriv/ByteString/LeftToRight.lhs b/Text/Regex/PDeriv/ByteString/LeftToRight.lhs
--- a/Text/Regex/PDeriv/ByteString/LeftToRight.lhs
+++ b/Text/Regex/PDeriv/ByteString/LeftToRight.lhs
@@ -20,6 +20,8 @@
 >     , regexec
 >     ) where 
 
+
+> import Prelude hiding (Word)
 > import Data.List 
 > import Data.Char (ord)
 > -- import GHC.Int
diff --git a/Text/Regex/PDeriv/ByteString/LeftToRightD.lhs b/Text/Regex/PDeriv/ByteString/LeftToRightD.lhs
--- a/Text/Regex/PDeriv/ByteString/LeftToRightD.lhs
+++ b/Text/Regex/PDeriv/ByteString/LeftToRightD.lhs
@@ -20,6 +20,7 @@
 >     , regexec
 >     ) where 
 
+> import Prelude hiding (Word)
 > import Data.List 
 > import Data.Char (ord)
 > -- import GHC.Int
@@ -98,11 +99,12 @@
 
 > mapping :: D.Dictionary (Pat,Int) -> Pat -> Int
 > mapping dictionary x = let candidates = D.lookupAll (D.hash x) dictionary
->                        in candidates `seq` 
+>                            io = unsafePerformIO ((print x) >> (print (length candidates)))
+>                        in candidates `seq` -- io `seq`
 >                           case candidates of
 >                             [(_,i)] -> i
 >                             _ -> 
->                                 case lookup x candidates of
+>                                 case {-# SCC "mapping_lookup" #-} lookup x candidates of
 >                                 (Just i) -> i
 >                                 Nothing -> error ("this should not happen. looking up " ++ (pretty x) ++ " from " ++ (show candidates) )
 
@@ -134,6 +136,9 @@
 This would cause some compile time overhead and trading space with time.
 
 Technical problem, how to hash a [ Int ] in Haskell?
+
+
+todo clean up buildDPat0Table merge it with buildPdPat0Table
 
 > type NFAStates = [ Int ]
 
diff --git a/Text/Regex/PDeriv/ByteString/Posix.lhs b/Text/Regex/PDeriv/ByteString/Posix.lhs
--- a/Text/Regex/PDeriv/ByteString/Posix.lhs
+++ b/Text/Regex/PDeriv/ByteString/Posix.lhs
@@ -27,6 +27,7 @@
 >     ) where 
 
 
+> import Prelude hiding (Word)
 > import System.IO.Unsafe
 
 
diff --git a/Text/Regex/PDeriv/ByteString/RightToLeft.lhs b/Text/Regex/PDeriv/ByteString/RightToLeft.lhs
--- a/Text/Regex/PDeriv/ByteString/RightToLeft.lhs
+++ b/Text/Regex/PDeriv/ByteString/RightToLeft.lhs
@@ -22,6 +22,8 @@
 >     , parsePat
 >     ) where 
 
+
+> import Prelude hiding (Word)
 > import Data.List 
 > import Data.Char (ord)
 > import GHC.Int
diff --git a/Text/Regex/PDeriv/ByteString/TwoPasses.lhs b/Text/Regex/PDeriv/ByteString/TwoPasses.lhs
--- a/Text/Regex/PDeriv/ByteString/TwoPasses.lhs
+++ b/Text/Regex/PDeriv/ByteString/TwoPasses.lhs
@@ -23,6 +23,8 @@
 >     , regexec
 >     ) where 
 
+
+> import Prelude hiding (Word)
 > import Data.List 
 > import Data.Char (ord)
 > import GHC.Int
diff --git a/Text/Regex/PDeriv/RE.lhs b/Text/Regex/PDeriv/RE.lhs
--- a/Text/Regex/PDeriv/RE.lhs
+++ b/Text/Regex/PDeriv/RE.lhs
@@ -66,9 +66,9 @@
 >     hash (Choice r1 r2 NotGreedy) = {- let x1 = head (hash r1)
 >                                         x2 = head (hash r2)
 >                                     in [ 4 + x1 * primeL + x2 * primeR ] -} [4]
->     hash (Seq r1 r2) = {- let x1 = head (hash r1)
+>     hash (Seq r1 r2) = let x1 = head (hash r1)
 >                            x2 = head (hash r2)
->                        in [ 5 + x1 * primeL + x2 * primeR ] -} [5]
+>                        in [ 5 + x1 * primeL + x2 * primeR ] --  [5]
 >     hash (Star r Greedy) = {- let x = head (hash r)
 >                            in [ 6 + x * primeL ] -} [6]
 >     hash (Star r NotGreedy) = {- let x = head (hash r)
@@ -121,7 +121,8 @@
 
 > -- | function 'partDeriv' implements the partial derivative operations for regular expressions. We don't pay attention to the greediness flag here.
 > partDeriv :: RE -> Char -> [RE]
-> partDeriv r l = nub (partDerivSub r l)
+> partDeriv r l = let pds = (partDerivSub r l)
+>                 in {-# SCC "nub_pd" #-} nub pds                                                  
 
 
 > partDerivSub Phi l = []
diff --git a/Text/Regex/PDeriv/String/LeftToRightD.lhs b/Text/Regex/PDeriv/String/LeftToRightD.lhs
--- a/Text/Regex/PDeriv/String/LeftToRightD.lhs
+++ b/Text/Regex/PDeriv/String/LeftToRightD.lhs
@@ -20,6 +20,8 @@
 >     , regexec
 >     ) where 
 
+
+> import Prelude hiding (Word)
 > import Data.List 
 > import Data.Char (ord)
 > -- import GHC.Int
diff --git a/regex-pderiv.cabal b/regex-pderiv.cabal
--- a/regex-pderiv.cabal
+++ b/regex-pderiv.cabal
@@ -1,5 +1,5 @@
 Name:                   regex-pderiv
-Version:                0.1.3
+Version:                0.1.4
 License:                BSD3
 License-File:           LICENSE
 Copyright:              Copyright (c) 2010-2012, Kenny Zhuo Ming Lu and Martin Sulzmann
