updated schedule query