Worked more on energy calculation