cleanup & rotate