fixing size of A in leastsquares