updating thumbnail code