Changed generate button to preview