ENERGY FUNCTIONS IN BOX BALL SYSTEMS