some little change and init websocket functions