Updated to include logic for opposite booleans