added support for persistent dbs