more awesome calculation of the toal