now it works with rotation and double