extracted function 'makePersistent'
added 'save groceries'