modify for auto_preview