implement weird equals rules