s(k) function changed