After long DEBUG of energy function