Fixed bad (1-D) thread counting; changed to 2-D using dim3 type