added isGraph