added to_matrix in the quaternion class for quaternion to matrix conversion and resolved circular dependency