Adding Energy Calculation