yarik's rotation stuff