first implementation of websockets client side