added -r to extract thumbnails