added rotate event handler