added loadDb, function which loads the database.