clean up graph