Update code to connect to automatically created ws process