What two factors does potential energy depend on?