jackknife 2pcf code with threading capability added