Revert "use graph_total instead of own $total variable"

This reverts commit fef9b225afdccffbd3146e34f3907eeb1f718439.