refactored sb fitter to its own lib