added adaptative queries