debug query added