refactored dropdown box