added feature for changing teams multiple times before locking.