added rotation of joints