note changes to use indexes to toggle checkboxes