Program will now be written in haskell