Add selection/de-selection code