gen preview on save