updating graphs