add logic for swapping players