fixing k_fold with the q_times; adding 0<q<1 assertion to avoid errors