working on socket for master