rename variable to avoid shading built-in function in train(). Fix bug with prior renaming in the query() method