added ability to pass where clause in req.query