refactoring a database variable name

self.newdb not points to the new database object