listen for connections correctly