Added functions to rotate N times