cleanup graph