some demo code to calculate torsion angles