Updated preview functionality