refactor ws to separate multiplayer object