new logick for checkbox