m file for training and testing