update graph printG