refactoring ws_server dict->class