added preview functionality to surveys