use the new gallery variable