graphs are refactored