Added variable total

Added the variable total