Hacked double-pendulum problem into code. CHECK THIS