updated tracks computation to take into accout rig structure. #2