bp refactor