started a function to calculate sclae factor relationship for each w