added a shrinkfun option in createBayes and adapted matchingfunctions