found a big bug f[i]->f[sk+i]