prepare for preview