simplfy condition-query