modernised the server socket creation