creating graph filter method on graph controller and Refactoring graph structure