add rotate and crop function