added selectedIndex property, to show perviously selected item