added t to energy_val