finish energy calculation test