still an error in the energy-function