init model
write model to json