Integrated the rotation matrix