move trainModel.m to train