added energy function in solar system