refactor for simplicity, almost completely finished with basic implementation of websocket