figuring out how graph works