changed client side to work with jwebsockets