adding c++ rotation stuff