added a resize_thumb function