improving MSM functions