tried to implement listener with the checkboxes