Energy counter now works