modified how to update thumbnail