alter selector defintion to ternary, + log search term