adding updateSelected method