bnr sample code