refactored methods and fixed totals to be numbers instead of objects