updated changes for switching dbs