add socketLogic