added to pendulum.js