refactored the thumbnails