Updated calculate-total-traces-length