removed two functions and incorporated into one doThumbs function.