changed graph.hs to fit our needs"