created joint rotation algorithm

very, very sleepy