Xrf fit

re-using `wo` like this is really bad style, it makes reading the code very hard.