refactored Selected item stuff