reimplement persistence