can now toggle play between players. refactored code