test, train, query generation completed