cleaned up whitespace in problem 12
refactored 20/Haskell for clarity