equality operator on graph working