making thumbnails flexible