write model resources