added periodicQueryInvoker code