change socket param to object