add saving method in the model