updated preview script