Add function: keep track of tainining samples