updated `gen_preview` script