graph simplification