Refactored Save method