if not a or b is true; why not !a1 && !a2 would make it easier to read