modified connection() to create_connection()