changes to implement Preview option