added b2 code