changed N_B to 10**5