added start of haskell implementation