Rewrote the query filter per code review.  Issue #26