updated to work with latest changes to FooGallery