haskell 51 (almost done)