Finished problem 3 in haskell!