modified the model struct and added first version of saving