trainstepC2 function

internal function for s-esom