minor bugfix
internal functions used in train simplified