connect to database, get a list of previews