measuring energy