changed the checkbutton event to image event