some minor functions added for player checking