added how to record and use training data