Refactors save method