work for preview generation