add functions init, count_players and send2