adapt for the new gallery