refactor the sbp