added a few changes for haskell