Add a 'total' variable and an initializatio controller