     // 32 is some threshold for really big rigid bodies- this should be small to reduce overhead in required shared memory
     if (nmax <= 32)
 		{
-		unsigned int window_size = 16;
 		unsigned int block_size = nmax; // each thread in a block takes care of a particle in a rigid body
 		dim3 force_grid(n_bodies, 1, 1);
 		dim3 force_threads(block_size, 1, 1); 

        */
        
        // This might require more calculations but more stable 
        // particularly when the rigid body longer than half the box
        ri.x = ex_space.x * particle_pos.x + ey_space.x * particle_pos.y 
                + ez_space.x * particle_pos.z;
        ri.y = ex_space.y * particle_pos.x + ey_space.y * particle_pos.y 

            body_force[threadIdx.x].w = fi.w;
            
            // This might require more calculations but more stable
			// particularly when rigid bodies are bigger than half the box
            ri.x = ex_space.x * particle_pos.x + ey_space.x * particle_pos.y 
                    + ez_space.x * particle_pos.z;
            ri.y = ex_space.y * particle_pos.x + ey_space.y * particle_pos.y 
