MSD with improved unfolding function