added some comments to the haskell version