next step to implement calculation of free energy