solving a problem with turn switching.