Added setSelected method