update graph complete implementation