getting sockets in order