tweak pendulum example