chaned uint.is_valid to isValid