moving max_vect_size to its own file
adapt inner_fold for max_vect_size