first alterations to use websockets