added the logic for if a checkbox is not selected