adjust checkbox logic