add BB algorithm