added multiselect logic