changed function description to get training data