Refactoring, rotate graph