adding some logic to filter dropdowns