Add more detail to total function.