added method description for isValid