added code to main.hs