total energy calculation taken out