Changing init function to accept multiple connections.