minor updates for batch training