update function createGraph