add method isValid