added asserts to train.c