gallery script finished