refactor dropdown: remove useless code