BP refactor