Method to compute coefficients A and B implemented, have end output