#179 added query criteria.

resolves #179