add new implementation in haskell