implemented mean square displacement
implemented calculation of mean square displacement