function [beta,PROBLEM]=drawvarnewx_1(Y0,X0,sigmain,N,L,beta0,EX,maxtrys)

%conditional mean of the VAR coefficients
  mstar=vec(X0\Y0);  %ols on the appended data
  xx=X0'*X0;
  ixx=invpd(xx);  %inv(X0'X0) to be used later in the Gibbs sampling algorithm

   [ beta,PROBLEM] = getcoefxx_1( mstar,sigmain,ixx,maxtrys,N,L,EX );
    if PROBLEM
        beta=beta0;
    end
       
   
 