complete the websocket funcion
delete unused files