Why do it this way? in stead of  if  (!A) then B else A  this should be if A then A else B