So as I understand it, heat energy of an object is the SUM of all the kinetic energies of the molecules of the object (uptoup to constant factor).
The temperature on the other hand is the AVERAGE of the kinetic energies of all the molecules of the object.
Now when ice is melting at 0 degrees Celsius$0\,^\mathrm o$C, the temperature as measured on a thermometer does not go up.
The common explanation is that any heat being absorbed by the ice is being used to break the somewhat strong solid solid bonds between the molecules of the ice.
Here is my question. ifIf heat of an object is what I defined above, then since all the molecules are increasing in kinetic energy, the average of the kinetic energy should also increase, meaning the temperature should increase. But at 0 degrees celsius$0\,^\mathrm o$C for ice that does not seem to be the case.
Where am I going wrong in my understanding?