added $final to selectIndex()