simplify condition-query