instead of making this a function, why not just make it a number? Your other object methods can reference it with this.total