             com = tex1Dfetch(rigid_data_com_tex, idx_body);
             vel = tex1Dfetch(rigid_data_vel_tex, idx_body);
             orientation = tex1Dfetch(rigid_data_orientation_tex, idx_body);
-            ex_space = tex1Dfetch(rigid_data_exspace_tex, idx_body);
-            ey_space = tex1Dfetch(rigid_data_eyspace_tex, idx_body);
-            ez_space = tex1Dfetch(rigid_data_ezspace_tex, idx_body);
             body_imagex = tex1Dfetch(rigid_data_body_imagex_tex, idx_body);
             body_imagey = tex1Dfetch(rigid_data_body_imagey_tex, idx_body);
             body_imagez = tex1Dfetch(rigid_data_body_imagez_tex, idx_body);
             force = tex1Dfetch(rigid_data_force_tex, idx_body);
             torque = tex1Dfetch(rigid_data_torque_tex, idx_body);
             conjqm = tex1Dfetch(rigid_data_conjqm_tex, idx_body);
+            
+            exyzFromQuaternion(orientation, ex_space, ey_space, ez_space);
             
             // update velocity
             float dtfm = dt_half / body_mass;

    if (error != cudaSuccess)
        return error;
        
    error = cudaBindTexture(0, rigid_data_exspace_tex, rigid_data.ex_space, sizeof(float4) * n_bodies);
    if (error != cudaSuccess)
        return error;
        
    error = cudaBindTexture(0, rigid_data_eyspace_tex, rigid_data.ey_space, sizeof(float4) * n_bodies);
    if (error != cudaSuccess)
        return error;
        
    error = cudaBindTexture(0, rigid_data_ezspace_tex, rigid_data.ez_space, sizeof(float4) * n_bodies);
    if (error != cudaSuccess)
        return error;
    
    error = cudaBindTexture(0, rigid_data_body_imagex_tex, rigid_data.body_imagex, sizeof(int) * n_bodies);
    if (error != cudaSuccess)
        return error;

        return error;
        
    error = cudaBindTexture(0, rigid_data_orientation_tex, rigid_data.orientation, sizeof(float4) * n_bodies);
    if (error != cudaSuccess)
        return error;
        
