reworking to not use websockets