implement permutation algorithm combobox behaviour