write models