sgen.py: change total level calcs