adding haskell solution