Finish implementing the query methods