energy display function tested and passed