adding multiplayer and refactoring