formatted bextract.cpp