generating thumbs and json data