rewrote the query relying on NEST conditionless construct
Merge pull request #1 from Mpdreamz/master

rewrote the query relying on NEST conditionless construct