function to make graph was missing; added function