Refactors method that switches player