typos and whitespaces
first implementation of PadLocalIndices
implement padIndexAvg
test padIndexAvg