added haskell version of prime