a query builder for mongodb