this condition gives me headache while parsing the code but I can't think of a better way to write it.

can you please at least add spaces where it's missing between operators?