rewrote the query relying on NEST conditionless construct