added code for the b4 app