changed some access modifiers
removed unused dimension of A and B matrices