Changed how connection works