handle the dropdown selection