refactoring of dropdown menus