implemented pendulum move