rename count as weightSum
fix spaces formatting
rename weightsSum as weightSum