minor refactor; more graph methods