update gallery & history