testing schedule queries; fixed db key problem