fit_MSA function

Fit MSA model