changed from http requests to websockets