added trapes_sum