selection of options based on condition