adjusted graph classes to make important methods public