added preview mode