updated comments and createGraph function descriptions