added haskell code