small comment: can we change 'is_valid' to 'IsValid'?