galleryup script modified