Implemented usage of the selected() function.