how to calculllate for potential energy?