Added var total

Added var total