refactor actions
refactored websocket actions