divided big list range over subranges when iterating and calculating the sum of squares