function val = FitGPLeftTailnew(beta,a1,Quant_1,Quant_2,f_1,f_2) 

%% this is what we are looking for

%% Quant1 and Quant2 are strikes such that Quant1>Quant2
xi=beta(1);
phi = beta(2);
sigma = beta(3);


val(1)=gevpdf(-Quant_1,xi,sigma,phi)-f_1;
val(2)=gevpdf(-Quant_2,xi,sigma,phi)-f_2;
val(3)=gevcdf(-Quant_1,xi,sigma,phi,'upper')-a1;




