Code used in the Motion Capture system