major update, for haskell