initialize selectedIndex to 0 or currently selected option