iterator insteads of index in runthread