added changes for graph