upgrade createGraph