updated bbfdetect (performance decrease)