refactored persistencestatesupplier