update Graph