added pure isValid methid