Added some code for receiving host and port from master