added intermediate training data and indeces