added code to graph utils file