fixed btagging code