add potential energy func