added isPlayerAgent function.