added all functions to Graph class