changes to gallery.php