added Main.hs
added some logic