formatting lists on optimized r-sum-