change the data method to query