add logic for multi-players