Graph - refactoring