problem10: made haskell solution a module