refactored problem 12/Haskell
refactored problem 12/Haskell again for speed boost