fixed bug in code and removed temporary fit to sampling fractions