Updated code with updated graph

Minor correction in the code