updated graph js file