Added my haskell code, slightly different, doesn't completely work