selection and deselection working