more refactoring: simplifying train_tracker logic