update normalizeIndex in normalization

update normalizeIndex in normalization, added legDist