iterate over all k