fixed compute total potential