add nested method for graphs;