saving the energy distribution
should work with old gcc