A global zero residual least squares method