updated for min version of web sockets