minor changes to rotmatrix