graph refactor in progress