pthread working version - copy element by element