make dropdownMenu function for refactoring action