added all_dbs() method and made db attribute optional