Added from_msm and vectorize