summ calculation