rewrite tray