debug BD.cpp