try to make updategraph run faster