tray update function