update preview code