changing between selected and deselected works, just need to fix intersect function