Created additional methods for Graph class