change model structure for gallery