add previews function