finished computing b and A