refactoring to chain of responsibility

just to clear up the design of the graphing