Excerise 3.1.2 1-3, including test for multiple connections