added double pendulum code