pendulum control updated