started to implement Main.hs functions