improved graph update