extend Graph class to create new graphs