Implemented function to select or deselect all collections