fixed bug in new mapping with training set