switched cauchy fn to energy fn