function [ eS, cI ] = permTest( x,y,fhandle, quant, perm )
%PERMTEST takes to vectores and checks for effect size and confidence
%intervall
portion = 0.2;
nx = length(x);
nxx = ceil(portion*nx);
ny = length(y);
nyy = ceil(portion*ny);
res = zeros(1,perm);
for i = 1:perm;
    xx = randsample(nx,nxx); 
    yy = randsample(ny,nyy);
    res(i) = fhandle(x(xx))-fhandle(y(yy));
end
eS = median(res);
cI = quantile(res,quant);
end

