[WIP] still trying to fix computation of ESF