Solution for rotate.