Switch to single get_connection function