implement prev_training_category
implement prev_training_category in turn-end
implement prev_command_category and fix