fixed the prev state computation bug
fixed the sizes of the buffers to allow to run 16 threads