modifying logging with total