more changes for new structure of sockets