added debug code to main.cpp in BSZ