bug fix: get reference from the training data