Add a private method to perform queries