Added a variable called total and the return