create util to write models