bcoalgorithm