BB functions finished