add rotate piece function