Added hashCode to graph