added a variable and console log to store the total amount of money in the console