added a version that creates previews
added a version that creates previews