add prevent negative sums, added duration per row, improved UI