Insert $total

See #6822