implements transaction handling; update vertex/edge weights; fixes example