changes to limb calculation and fixing part of scanloader