updated BMatrix and other