refactoring such that potentials can return different objects for different computations.