refactoring Parse.hs