add connect_db
implemented connect_db