Xrf fit

fashion used in the old code. I will change this.