improved form of graphs plus handle data updates