- adding problem 3 in haskell