Adding pendulum example