since `fitfn` is a single line, and not used directly outside of `errfn`, why not just lump them together? will reduce function call overhead