add rotate and clean code