changed all _final variables to _total for clarity