some strint functions
freq. analysis step 1
fix collect-nth