some improvements to multiplayer code