saving the instance states for rotation