fixed threadIdx to blockIdx