start to reorganize socket events