theory calculation of B is working now