patched persistence, should be much faster now