n_over_k error for k > 2 corrected