change select logic