updating checkbox functionality