updates gallery script