refactor the equals expression to remove the awkward right and left names