working on socket