updated stuff for graphs