added full x-validation procedure