all sorts of graphs manipulation