Test & debug bgi_sub