updated creation of thumbnail