Added graph equals method