added switch case for player