getting more Haskell-y by the iteration!