added backGallery function