added nice c++11's feature and 'mask' for v-vold cross-validation