implement (untested) BSig codes