added deleteThumbnails function