moving db initialization in method get_db