assign 2 indices to each thread