What two factors affect potential energy?