Adding/modifying functionality to support the gallery.
converting to groovy