modify code for dropdown