finish the persistent data function