finished haskell partial solution